package com.gmall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@MapperScan("com.gmall.product.mapper")
@ComponentScan({"com.gmall"})
@EnableRabbit
public class ProductApplication implements CommandLineRunner,ApplicationRunner {
    public static void main(String[] args) {
        SpringApplication.run(ProductApplication.class, args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("启动成功1");
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("启动成功2");
    }
}

